<template>
  <el-container>
    <el-header>
      <div class="header">
        <div class="billlogo">设备验证系统</div>
        <div class="userimgbox">
          <el-dropdown>
            <span class="el-dropdown-link">
              <img class="userimg" src="../../assets/timg.gif">
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item @click.native="logout">安全退出</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </div>
    </el-header>
    <el-container>
      <el-aside>
        <itemsidebar></itemsidebar>
      </el-aside>
      <el-container>
        <el-main>
          <breadcrumb class="breadcrumb"></breadcrumb>
          <router-view></router-view>
        </el-main>

      </el-container>
    </el-container>

  </el-container>
</template>
<script>
import itemsidebar from "@/components/public/sidebar";
import breadcrumb from "@/components/public/breadcrumb";
import { mapActions } from "vuex";
export default {
  components: {
    itemsidebar,
    breadcrumb
  },
  name: "",
  data: function() {
    return {};
  },
  methods: {
    ...mapActions(["LogOut"]),
    //退出登录
    logout() {
      //   this.$confirm("确认退出吗?", "提示", {
      //     //type: 'warning'
      //   }).then(() => {
      this.LogOut().then(_ => {
        this.$router.push("/login");
      });
      //   });
    }
  }
};
</script>

<style>
body {
  background: #f1f1f1;
}
.toolbar {
  padding: 20px 30px;
  background: #fff;
  margin-bottom: 25px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.el-header {
  padding: 0;
}
.el-aside {
  width: 200px !important;
}
.header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  line-height: 60px;
  color: white;
  background: linear-gradient(90deg, #0569d0, #409eff);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.13);
}
.billlogo {
  text-align: center;
  font-size: 20px;
  width: 200px;
  float: left;
}
.userimgbox {
  float: right;
  height: 60px;
}
.userimg {
  width: 50px;
  height: 50px;
  border-radius: 100%;
  margin-right: 40px;
  vertical-align: middle;
}
.el-footer {
  border-top: solid 1px #e6e6e6;
  position: relative;
  bottom: 0;
  margin-top: 30px;
  color: white;
  background-color: #475669;
}
.el-footer p {
  text-align: center;
}
.el-pagination {
  padding-top: 20px;
}
.breadcrumb {
  height: 30px;
}
.breadcrumb span {
  cursor: pointer;
}
.el-dialog__body .inner {
  text-align: center;
}
.el-breadcrumb__inner a,
.el-breadcrumb__inner.is-link {
  color: #606266;
}
</style>